﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace HYSession
{
    public class Session
    {
        private static Hashtable htSessionInfo = new Hashtable();
        private static object oLock = new object();
        
        private Session()
        {
        }

        public static object GetValue(object oKey)
        {
            if(!htSessionInfo.ContainsKey(oKey))
            {
                return null;
            }
            return htSessionInfo[oKey];
        }

        public static void SetValue(object oKey,object oValue)
        {
            lock (oLock)
            {
                htSessionInfo[oKey] = oValue;
            }
        }         
    }
}
